package com.example.mangroves.service.impl;

import com.example.mangroves.entity.GeoInfo;
import com.example.mangroves.mapper.GeoInfoMapper;
import com.example.mangroves.service.GeoInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class GeoInfoServiceImpl implements GeoInfoService {

    @Autowired
    private GeoInfoMapper geoInfoMapper;

    @Override
    public GeoInfo getLastGeoInfo() {
        return geoInfoMapper.findLastGeoInfo();
    }

    @Override
    public void saveGeoInfo(GeoInfo geoInfo) {
        geoInfoMapper.insert(geoInfo);
    }

    @Override
    public int insertGeoInfo(GeoInfo geoInfo) {
        return geoInfoMapper.insertGeoInfo(geoInfo);
    }

    @Override
    public int getLastInsertId() {
        return geoInfoMapper.getLastInsertId();
    }


}
